Use Windows.pkg
Use DFClient.pkg
Use cCompanyDataDictionary.dd
Use cDeptDataDictionary.dd
Use cEmplDataDictionary.dd

Deferred_View Activate_oDemoCorpX_Request_Assign_Request_Find for ;
Object oDemoCorpX_Request_Assign_Request_Find is a dbView
    Object oCompany_DD is a cCompanyDataDictionary
    End_Object

    Object oDept_DD is a cDeptDataDictionary
        Set DDO_Server to oCompany_DD
    End_Object

    Object oEmpl_DD is a cEmplDataDictionary
        Set DDO_Server to oDept_DD
    End_Object

    Set Main_DD to oEmpl_DD
    Set Server to oEmpl_DD

    Set Border_Style to Border_Thick
    Set Size to 91 227
    Set Location to 2 2
    Set Label to "Demo Request_Assign & Request_Find"

    Object oTextBox1 is a TextBox
        Set Size to 10 197
        Set Location to 6 13
        Set Label to 'Instructor:  Put BreakPoints in OnClick methods...'
    End_Object

    Object oTextBox2 is a TextBox
        Set Size to 10 50
        Set Location to 19 49
        Set Label to '...and display global and local buffers.'
    End_Object

    Object oClearBtn is a Button
        Set Size to 14 93
        Set Location to 38 61
        Set Label to 'Clear Method Employee'

        Procedure OnClick
            Send Clear of oEmpl_DD
        End_Procedure

    End_Object

    Object oEmplCode is a Form
        Set Size to 13 26
        Set Location to 56 88
        Set Label to "Employee Code"
        Set Label_Col_Offset to 2
        Set Label_Justification_Mode to JMode_Right
    End_Object

    Object oRequestAssignBtn is a Button
        Set Size to 14 95
        Set Location to 74 19
        Set Label to 'Request_Assign Employee'

        Procedure OnClick
            Integer iCode

            Get Value of oEmplCode to iCode
            Clear Empl
            Move iCode to Empl.CODE
            Find EQ Empl by Index.1
            If (Found) Begin
                Relate Empl.File_Number
                Send Request_Assign of oEmpl_DD Empl.File_Number
            End
        End_Procedure

    End_Object

    Object oRequestFindBtn is a Button
        Set Size to 14 87
        Set Location to 74 126
        Set Label to 'Request_Find Employee'

        Procedure OnClick
            Integer iCode

            Get Value of oEmplCode to iCode
            Clear Empl
            Move iCode to Empl.CODE
            Send Request_Find of oEmpl_DD EQ Empl.File_Number 1
        End_Procedure

    End_Object

    Procedure page_object Boolean bPage
        Forward Send Page_Object bPage
        Set In_Use_State of oEmpl_DD to True
        Set In_Use_State of oDept_DD to True
        Set In_Use_State of oCompany_DD to True
    End_Procedure

Cd_End_Object
